#pragma once

#include "Block.h"
#include "BlockColor.h"
#include "Player.h"
#include "Scene.h"
#include <map>
#include <vector>


class Combo{

	struct player_cmp
	{
		bool operator() (const Player lhs, const Player rhs) const
		{
			return lhs.GetPlayerIndex() < rhs.GetPlayerIndex();
		}
	};
	typedef std::map<Player, std::vector<Block>, player_cmp> Dict_Combo;
	enum TypePower {FIRE, HEAL, HURRICANE, ICE, IRON, THUNDER};

public:
	Combo(Player *player, Dict_Combo *combos, Scene *scene);
	void Update();
	Player *owner;

private:
	short int level;
	std::vector<Block> powers;
	TypePower typePower;

	std::vector<Block>::iterator it_block;
	std::vector<Block>::iterator it_combo;

	void SendPower(Dict_Combo &combos, Scene *scene);
	void AddPower(Block block, Player player);

	void NextLevel();
	void PreviewLevel();

};